package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.Collect;
import cn.wolfcode.trip.base.mapper.CollectMapper;
import cn.wolfcode.trip.base.service.ICollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CollectServiceImpl implements ICollectService {
    @Autowired
    private CollectMapper collectMapper;

    /**
     * 查询
     * @param collect
     * @return
     */
    public Collect selectOne(Collect collect) {
        return collectMapper.selectByOne(collect);
    }

    /**
     * 保存
     * @param collect
     */
    public void saveOne(Collect collect) {
        collectMapper.insertByOne(collect);
    }

    /**
     * 删除
     * @param collect
     */
    public void deleteOne(Collect collect) {
        collectMapper.deleteByOne(collect);
    }

    /**
     * 计数
     * @param collect
     * @return
     */
    public int selectForCount(Collect collect) {
        return collectMapper.selectForCount(collect);
    }
}
